﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PhotoHsn.BLL.Adapters;
using System.Data.SqlClient;
using System.Diagnostics;
using Bxas.Core.Exceptions;

namespace PhotoHsn.BLL.Generic
{
    public class BrandsBs : PhotoHsn.BLL.Abstracts._BrandsBs
    {
        public List<Brands> get_all(int p_EquipmentTypeId)
        {
            SqlCommand sqlcommand = new SqlCommand();
            sqlcommand.CommandText = PhotoHsn.BLL.SqlStrrings.BrandSqlStrings.WithEquipmentType;
            sqlcommand.Parameters.AddWithValue(PhotoHsn.BLL.Adapters.Brands.ColumnNames.EquipmentTypeId, p_EquipmentTypeId);

            try
            {
                List<Brands> list = get(sqlcommand);
                if (list == null) return null;              
                return list;
            }
            catch (BxasCoreException ex)
            {
                throw ex;
                    //ErrorLogInsert(ex, this, new StackFrame());
            }        
        }
    }
}